/*************************************************************************
	> File Name: oj-449_yanghui.c
	> Author: Wang Bo
	> Mail: 1276106221@qq.com
	> Created Time: 2020年10月21日 星期三 22时47分04秒
 ************************************************************************/

#include <stdio.h>

void output(int a[]) {
    int i = 0;
    while (a[i]) {
        i && printf(" ");
        printf("%d", a[i]);
        i++;
    }
    printf("\n");
}

void copy(int *a, int *b, int len) {
    for (int i = 0; i < len; ++i) {
        a[i] = b[i];
    }
}

void fn(int a[], int n) {
    int i = 1;
    output(a);
    while (n-- > 1) {
        i++;
        a[i - 1] = a[0];
        int temp[30] = {0};
        if (i != 2) copy(temp, a, i);
        for (int j = 1; j < i - 1; ++j) {
            a[j] = temp[j - 1] + temp[j];
        }
        output(a);
    } 
}


int main() {
    int n, yh[30] = {0}; 
    yh[0] = 1;
    scanf("%d", &n);
    fn(yh, n);
    return 0;
}
